import request from '@/utils/request'
import { baseResponse } from '@/types/index'
import { GetIndividualVolunteerActivitiesResponse, SignInActivityRequest } from '@/types/volunteer'
import type { enlistActivityRequest } from '@/types/volunteer'

//获取志愿者的参加的志愿活动
export const GetIndividualVolunteerActivities = async () =>
  (await request.get<baseResponse<Array<GetIndividualVolunteerActivitiesResponse>>>('VoluntaryActivity/Activity/GetVolunteerActivityList')).data
//参加活动
export const joinActivity = async (enlistActivity: enlistActivityRequest) =>
  (await request.post<baseResponse<string>>('VoluntaryActivity/Activity/EnlistVolunteer', enlistActivity)).data
// 签到活动
export const signActivity = async (requestData: SignInActivityRequest) =>
  await request.post<baseResponse<string>>('VoluntaryActivity/Activity/VolunteerSignInActivity', requestData)
